<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ page import="cn.edu.ujn.shi.dao.UserType" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">

    <title>注册账号</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->

</head>


<body>
<div style="width:100%;background:#EDEDED">
    <span style='margin-left:900px'>
    <a href='index'><img src='images/h1.png' width='30px'><font color='#0A0A0A'>回首页</font></a>&nbsp;
    <a href='login'><img src='images/h2.png' width='30px'><font color='#0A0A0A'>请登录</font></a>&nbsp;
    <a href='Register'><img src='images/h3.png' width='30px'><font color='#0A0A0A'>请注册</font></a>&nbsp;
    </span>
    <hr/>
</div>
<div style="width:100%;">
    <span style='margin-left:20px'>
    <img src='images/title.png' width='15%'>
    <font color='#458B74' face='黑体' size='+3'>用户注册</font>&nbsp;   
    </span>
</div>
<hr/>

<div style="width:100%;height:650px;background:url('images/aa4.jpeg');">
    <br/><br/><br/><br/>
    <div style="margin-left:400px;">
        <form action='InsertUserServlet' method='post'>
            <table>
                <tr>
                    <td>
                        用户账号：
                    </td>
                    <td>
                        <input type="text" name="username" style="width:200px;"/>
                    </td>
                </tr>

                <tr>
                    <td>
                        用户密码：
                    </td>
                    <td>
                        <input type="password" name="userpass" style="width:200px;"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        真实姓名：
                    </td>
                    <td>
                        <input type="text" name="truename" style="width:200px;"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        用户年龄：
                    </td>
                    <td>
                        <input type="text" name="age" style="width:200px;"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        身份证号：
                    </td>
                    <td>
                        <input type="text" name="cardnumber" style="width:200px;"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        联系方式：
                    </td>
                    <td>
                        <input type="text" name="tel" style="width:200px;"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        身份类型:
                    </td>
                    <td>
                        <% out.println("<select name='type' style='width:200px;'>");
                            List<UserType> list1 = (List<UserType>) request.getAttribute("type");
                            for (UserType userType : list1) {
                                out.println("<option value = '" + userType.getId() + "' > " + userType.getType() + " </option >");
                            }
                            out.println("</select>"); %>
                    </td>
                </tr>


                <tr>
                    <td colspan="2" style="padding-top:20px">
                        <input type="submit" value="注册" style="width:140px;"/>
                        <input type="reset" value="重置" style="width:140px;"/>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
</body>

</html>
